package fr.utbm.lo54.project.fr.unitaire;

import java.sql.Connection;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.sql.DataSource;



public class TestConnexion {		
	public TestConnexion() {			
		try {
			Context namingContext = new InitialContext();
			DataSource dataSource = (DataSource)namingContext.lookup("java:comp/env/jdbc/schoolDatasource");
			Connection con = dataSource.getConnection();
			System.out.println("Succes");			
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			System.out.println("Fail");
		}
	}
}
